package com.example.administrator.kotlindemo

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.TextView
import android.widget.Toast

import butterknife.BindView
import butterknife.ButterKnife
import butterknife.OnClick

/**
 * Created by Administrator on 2017/8/2.
 */

class FourthActivity : Activity(), View.OnClickListener {


    private var textFirst: TextView? = null

    private var textSecond: TextView? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_fouth)

        textFirst!!.setOnClickListener(this)
        textSecond!!.setOnClickListener(this)
    }

    override fun onClick(view: View) {
        when (view.id) {
            R.id.text_first -> {
                Toast.makeText(FourthActivity@ this, "第一个按钮", Toast.LENGTH_LONG).show()
            }
            R.id.text_three_jump -> {
                Toast.makeText(FourthActivity@ this, "第二个按钮", Toast.LENGTH_LONG).show()
            }
        }
    }

}
